﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Bot.Application.Dto;
using Bot.Application.Services;
using Microsoft.AspNetCore.Mvc;

namespace Bot.WebAPI.Controllers
{
    [Route("api/v3/chatbot/operations")]
    [ApiController]
    public class OperationsController : ControllerBase
    {

        private readonly IBackgroundJobAppService _app;
        public OperationsController(IBackgroundJobAppService app)
        {
            this._app = app;
        }

        [HttpGet("{id}")]
        public ActionResult<OperationDto> Get([FromRoute] Guid id)
        {
            OperationDto operationDto = _app.Get(id);
            return Ok(operationDto);
        }
    }
}
